
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
  </head>
  <script src="${pageContext.request.contextPath}/statics/js/jquery-3.5.1.js"></script>
<script>
  function x() {
    $.post({
      url:"${pageContext.request.contextPath}/a1",
      data:{"name":$("#username").val()},
      success:function (data,status) {
        console.log("data="+data);
        console.log("status="+status);
      }
    })
  }

</script>
  <body>
<%--  失去焦点的时候，发送一个请求(携带信息)到后台--%>
用户名：<input type="text" id="username" onblur="x()">
  </body>
</html>
